package cn.fff.system.service;

import cn.fff.model.system.SysMenu;
import cn.fff.model.system.SysRole;
import cn.fff.model.vo.AssignMenuVo;
import cn.fff.model.vo.AssignRoleVo;
import cn.fff.model.vo.MenuTreeCheckVo;
import cn.fff.model.vo.SysRoleQueryVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

public interface SysRoleService extends IService<SysRole> {

    IPage<SysRole> selectPage(Page<SysRole> pageParam, SysRoleQueryVo sysRoleQueryVo);

    Map<String, Object> getRolesByUserId(String userId);

    @Transactional
    void doAssign(AssignRoleVo vo);

//    List<SysMenu> findMenuByRoleId(Long roleId);

    MenuTreeCheckVo findMenuByRoleId(Long roleId);

    @Transactional
    void authMenu(AssignMenuVo vo);
}
